<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">User Details</f:facet>


        <s:decorate id="login" template="layout/display.xhtml">
            <ui:define name="label">Login</ui:define>
            <h:outputText value="#{userHome.instance.login}"/>
        </s:decorate>

        <s:decorate id="password" template="layout/display.xhtml">
            <ui:define name="label">Password</ui:define>
            <h:outputText value="#{userHome.instance.password}"/>
        </s:decorate>

        <s:decorate id="name" template="layout/display.xhtml">
            <ui:define name="label">Name</ui:define>
            <h:outputText value="#{userHome.instance.name}"/>
        </s:decorate>

        <s:decorate id="surname" template="layout/display.xhtml">
            <ui:define name="label">Surname</ui:define>
            <h:outputText value="#{userHome.instance.surname}"/>
        </s:decorate>

        <s:decorate id="birthDate" template="layout/display.xhtml">
            <ui:define name="label">Birth date</ui:define>
            <h:outputText value="#{userHome.instance.birthDate}">
                <s:convertDateTime type="date" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="createDate" template="layout/display.xhtml">
            <ui:define name="label">Create date</ui:define>
            <h:outputText value="#{userHome.instance.createDate}">
                <s:convertDateTime type="both" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="modifyDate" template="layout/display.xhtml">
            <ui:define name="label">Modify date</ui:define>
            <h:outputText value="#{userHome.instance.modifyDate}">
                <s:convertDateTime type="both" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="deleteDate" template="layout/display.xhtml">
            <ui:define name="label">Delete date</ui:define>
            <h:outputText value="#{userHome.instance.deleteDate}">
                <s:convertDateTime type="both" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="type" template="layout/display.xhtml">
            <ui:define name="label">Type</ui:define>
            <h:outputText value="#{userHome.instance.type}"/>
        </s:decorate>

        <s:decorate id="calculatedRate" template="layout/display.xhtml">
            <ui:define name="label">Calculated rate</ui:define>
            <h:outputText value="#{userHome.instance.calculatedRate}"/>
        </s:decorate>

        <s:decorate id="enabled" template="layout/display.xhtml">
            <ui:define name="label">Enabled</ui:define>
            <h:outputText value="#{userHome.instance.enabled}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/UserEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty userFrom ? 'UserList' : userFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Commentonsuggestions</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="commentonsuggestionsChildren">

        <h:outputText value="There are no commentonsuggestions associated with this user."
                   rendered="#{empty userHome.commentonsuggestions}"/>

        <rich:dataTable value="#{userHome.commentonsuggestions}"
                       var="_commentonsuggestion"
                  rendered="#{not empty userHome.commentonsuggestions}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="commentonsuggestionsTable">
            <rich:column sortBy="#{_commentonsuggestion.idCommentOnSuggestion}">
                <f:facet name="header">Id comment on suggestion</f:facet>
                <h:outputText value="#{_commentonsuggestion.idCommentOnSuggestion}"/>
            </rich:column>
            <rich:column sortBy="#{_commentonsuggestion.msg}">
                <f:facet name="header">Msg</f:facet>
                <h:outputText value="#{_commentonsuggestion.msg}"/>
            </rich:column>
            <rich:column sortBy="#{_commentonsuggestion.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_commentonsuggestion.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectcommentonsuggestion"
                     value="Select"
                      view="/Commentonsuggestion.xhtml">
                    <f:param name="commentonsuggestionIdCommentOnSuggestion"
                            value="#{_commentonsuggestion.idCommentOnSuggestion}"/>
                    <f:param name="commentonsuggestionFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add commentonsuggestion"
                view="/CommentonsuggestionEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="commentonsuggestionFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Seats</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="seatsChildren">

        <h:outputText value="There are no seats associated with this user."
                   rendered="#{empty userHome.seats}"/>

        <rich:dataTable value="#{userHome.seats}"
                       var="_seat"
                  rendered="#{not empty userHome.seats}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="seatsTable">
            <rich:column sortBy="#{_seat.idSeat}">
                <f:facet name="header">Id seat</f:facet>
                <h:outputText value="#{_seat.idSeat}"/>
            </rich:column>
            <rich:column sortBy="#{_seat.seatNumber}">
                <f:facet name="header">Seat number</f:facet>
                <h:outputText value="#{_seat.seatNumber}"/>
            </rich:column>
            <rich:column sortBy="#{_seat.state}">
                <f:facet name="header">State</f:facet>
                <h:outputText value="#{_seat.state}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectseat"
                     value="Select"
                      view="/Seat.xhtml">
                    <f:param name="seatIdSeat"
                            value="#{_seat.idSeat}"/>
                    <f:param name="seatFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add seat"
                view="/SeatEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="seatFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Requests</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="requestsChildren">

        <h:outputText value="There are no requests associated with this user."
                   rendered="#{empty userHome.requests}"/>

        <rich:dataTable value="#{userHome.requests}"
                       var="_request"
                  rendered="#{not empty userHome.requests}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="requestsTable">
            <rich:column sortBy="#{_request.idRequest}">
                <f:facet name="header">Id request</f:facet>
                <h:outputText value="#{_request.idRequest}"/>
            </rich:column>
            <rich:column sortBy="#{_request.name}">
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_request.name}"/>
            </rich:column>
            <rich:column sortBy="#{_request.fromLat}">
                <f:facet name="header">From lat</f:facet>
                <h:outputText value="#{_request.fromLat}"/>
            </rich:column>
            <rich:column sortBy="#{_request.fromLon}">
                <f:facet name="header">From lon</f:facet>
                <h:outputText value="#{_request.fromLon}"/>
            </rich:column>
            <rich:column sortBy="#{_request.toLat}">
                <f:facet name="header">To lat</f:facet>
                <h:outputText value="#{_request.toLat}"/>
            </rich:column>
            <rich:column sortBy="#{_request.toLon}">
                <f:facet name="header">To lon</f:facet>
                <h:outputText value="#{_request.toLon}"/>
            </rich:column>
            <rich:column sortBy="#{_request.distance}">
                <f:facet name="header">Distance</f:facet>
                <h:outputText value="#{_request.distance}"/>
            </rich:column>
            <rich:column sortBy="#{_request.beginDate}">
                <f:facet name="header">Begin date</f:facet>
                <h:outputText value="#{_request.beginDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.endDate}">
                <f:facet name="header">End date</f:facet>
                <h:outputText value="#{_request.endDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.singleDay}">
                <f:facet name="header">Single day</f:facet>
                <h:outputText value="#{_request.singleDay}"/>
            </rich:column>
            <rich:column sortBy="#{_request.monday}">
                <f:facet name="header">Monday</f:facet>
                <h:outputText value="#{_request.monday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.tuesday}">
                <f:facet name="header">Tuesday</f:facet>
                <h:outputText value="#{_request.tuesday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.wednesday}">
                <f:facet name="header">Wednesday</f:facet>
                <h:outputText value="#{_request.wednesday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.thursday}">
                <f:facet name="header">Thursday</f:facet>
                <h:outputText value="#{_request.thursday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.friday}">
                <f:facet name="header">Friday</f:facet>
                <h:outputText value="#{_request.friday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.saturday}">
                <f:facet name="header">Saturday</f:facet>
                <h:outputText value="#{_request.saturday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.sunday}">
                <f:facet name="header">Sunday</f:facet>
                <h:outputText value="#{_request.sunday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.cronExpression}">
                <f:facet name="header">Cron expression</f:facet>
                <h:outputText value="#{_request.cronExpression}"/>
            </rich:column>
            <rich:column sortBy="#{_request.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_request.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.modifyDate}">
                <f:facet name="header">Modify date</f:facet>
                <h:outputText value="#{_request.modifyDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.deleteDate}">
                <f:facet name="header">Delete date</f:facet>
                <h:outputText value="#{_request.deleteDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectrequest"
                     value="Select"
                      view="/Request.xhtml">
                    <f:param name="requestIdRequest"
                            value="#{_request.idRequest}"/>
                    <f:param name="requestFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add request"
                view="/RequestEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="requestFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Dialogs</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="dialogsChildren">

        <h:outputText value="There are no dialogs associated with this user."
                   rendered="#{empty userHome.dialogs}"/>

        <rich:dataTable value="#{userHome.dialogs}"
                       var="_dialog"
                  rendered="#{not empty userHome.dialogs}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="dialogsTable">
            <rich:column sortBy="#{_dialog.idDialog}">
                <f:facet name="header">Id dialog</f:facet>
                <h:outputText value="#{_dialog.idDialog}"/>
            </rich:column>
            <rich:column sortBy="#{_dialog.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_dialog.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_dialog.updateDate}">
                <f:facet name="header">Update date</f:facet>
                <h:outputText value="#{_dialog.updateDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_dialog.deleteDate}">
                <f:facet name="header">Delete date</f:facet>
                <h:outputText value="#{_dialog.deleteDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_dialog.lastCommentDate}">
                <f:facet name="header">Last comment date</f:facet>
                <h:outputText value="#{_dialog.lastCommentDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_dialog.ownerSeenDate}">
                <f:facet name="header">Owner seen date</f:facet>
                <h:outputText value="#{_dialog.ownerSeenDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_dialog.otherSeenDate}">
                <f:facet name="header">Other seen date</f:facet>
                <h:outputText value="#{_dialog.otherSeenDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectdialog"
                     value="Select"
                      view="/Dialog.xhtml">
                    <f:param name="dialogIdDialog"
                            value="#{_dialog.idDialog}"/>
                    <f:param name="dialogFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add dialog"
                view="/DialogEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="dialogFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Evaluations</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="evaluationsChildren">

        <h:outputText value="There are no evaluations associated with this user."
                   rendered="#{empty userHome.evaluations}"/>

        <rich:dataTable value="#{userHome.evaluations}"
                       var="_evaluation"
                  rendered="#{not empty userHome.evaluations}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="evaluationsTable">
            <rich:column sortBy="#{_evaluation.idEvaluation}">
                <f:facet name="header">Id evaluation</f:facet>
                <h:outputText value="#{_evaluation.idEvaluation}"/>
            </rich:column>
            <rich:column sortBy="#{_evaluation.marks}">
                <f:facet name="header">Marks</f:facet>
                <h:outputText value="#{_evaluation.marks}"/>
            </rich:column>
            <rich:column sortBy="#{_evaluation.evalDate}">
                <f:facet name="header">Eval date</f:facet>
                <h:outputText value="#{_evaluation.evalDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectevaluation"
                     value="Select"
                      view="/Evaluation.xhtml">
                    <f:param name="evaluationIdEvaluation"
                            value="#{_evaluation.idEvaluation}"/>
                    <f:param name="evaluationFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add evaluation"
                view="/EvaluationEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="evaluationFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Travels</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="travelsChildren">

        <h:outputText value="There are no travels associated with this user."
                   rendered="#{empty userHome.travels}"/>

        <rich:dataTable value="#{userHome.travels}"
                       var="_travel"
                  rendered="#{not empty userHome.travels}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="travelsTable">
            <rich:column sortBy="#{_travel.idTravel}">
                <f:facet name="header">Id travel</f:facet>
                <h:outputText value="#{_travel.idTravel}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.name}">
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_travel.name}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.fromLat}">
                <f:facet name="header">From lat</f:facet>
                <h:outputText value="#{_travel.fromLat}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.fromLon}">
                <f:facet name="header">From lon</f:facet>
                <h:outputText value="#{_travel.fromLon}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.toLat}">
                <f:facet name="header">To lat</f:facet>
                <h:outputText value="#{_travel.toLat}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.toLon}">
                <f:facet name="header">To lon</f:facet>
                <h:outputText value="#{_travel.toLon}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.distance}">
                <f:facet name="header">Distance</f:facet>
                <h:outputText value="#{_travel.distance}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.travelState}">
                <f:facet name="header">Travel state</f:facet>
                <h:outputText value="#{_travel.travelState}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.calculatedRate}">
                <f:facet name="header">Calculated rate</f:facet>
                <h:outputText value="#{_travel.calculatedRate}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_travel.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.modifyDate}">
                <f:facet name="header">Modify date</f:facet>
                <h:outputText value="#{_travel.modifyDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.deleteDate}">
                <f:facet name="header">Delete date</f:facet>
                <h:outputText value="#{_travel.deleteDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.cronExpression}">
                <f:facet name="header">Cron expression</f:facet>
                <h:outputText value="#{_travel.cronExpression}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.monday}">
                <f:facet name="header">Monday</f:facet>
                <h:outputText value="#{_travel.monday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.tuesday}">
                <f:facet name="header">Tuesday</f:facet>
                <h:outputText value="#{_travel.tuesday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.wednesday}">
                <f:facet name="header">Wednesday</f:facet>
                <h:outputText value="#{_travel.wednesday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.thursday}">
                <f:facet name="header">Thursday</f:facet>
                <h:outputText value="#{_travel.thursday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.friday}">
                <f:facet name="header">Friday</f:facet>
                <h:outputText value="#{_travel.friday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.saturday}">
                <f:facet name="header">Saturday</f:facet>
                <h:outputText value="#{_travel.saturday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.sunday}">
                <f:facet name="header">Sunday</f:facet>
                <h:outputText value="#{_travel.sunday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.beginDate}">
                <f:facet name="header">Begin date</f:facet>
                <h:outputText value="#{_travel.beginDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.endDate}">
                <f:facet name="header">End date</f:facet>
                <h:outputText value="#{_travel.endDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.singleDay}">
                <f:facet name="header">Single day</f:facet>
                <h:outputText value="#{_travel.singleDay}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selecttravel"
                     value="Select"
                      view="/Travel.xhtml">
                    <f:param name="travelIdTravel"
                            value="#{_travel.idTravel}"/>
                    <f:param name="travelFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add travel"
                view="/TravelEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="travelFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Avatars</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="avatarsChildren">

        <h:outputText value="There are no avatars associated with this user."
                   rendered="#{empty userHome.avatars}"/>

        <rich:dataTable value="#{userHome.avatars}"
                       var="_avatar"
                  rendered="#{not empty userHome.avatars}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="avatarsTable">
            <rich:column sortBy="#{_avatar.idAvatar}">
                <f:facet name="header">Id avatar</f:facet>
                <h:outputText value="#{_avatar.idAvatar}"/>
            </rich:column>
            <rich:column sortBy="#{_avatar.name}">
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_avatar.name}"/>
            </rich:column>
            <rich:column sortBy="#{_avatar.image}">
                <f:facet name="header">Image</f:facet>
                <h:outputText value="#{_avatar.image}"/>
            </rich:column>
            <rich:column sortBy="#{_avatar.format}">
                <f:facet name="header">Format</f:facet>
                <h:outputText value="#{_avatar.format}"/>
            </rich:column>
            <rich:column sortBy="#{_avatar.type}">
                <f:facet name="header">Type</f:facet>
                <h:outputText value="#{_avatar.type}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectavatar"
                     value="Select"
                      view="/Avatar.xhtml">
                    <f:param name="avatarIdAvatar"
                            value="#{_avatar.idAvatar}"/>
                    <f:param name="avatarFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add avatar"
                view="/AvatarEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="avatarFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Comments</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="commentsChildren">

        <h:outputText value="There are no comments associated with this user."
                   rendered="#{empty userHome.comments}"/>

        <rich:dataTable value="#{userHome.comments}"
                       var="_comment"
                  rendered="#{not empty userHome.comments}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="commentsTable">
            <rich:column sortBy="#{_comment.idComment}">
                <f:facet name="header">Id comment</f:facet>
                <h:outputText value="#{_comment.idComment}"/>
            </rich:column>
            <rich:column sortBy="#{_comment.msg}">
                <f:facet name="header">Msg</f:facet>
                <h:outputText value="#{_comment.msg}"/>
            </rich:column>
            <rich:column sortBy="#{_comment.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_comment.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectcomment"
                     value="Select"
                      view="/Comment.xhtml">
                    <f:param name="commentIdComment"
                            value="#{_comment.idComment}"/>
                    <f:param name="commentFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add comment"
                view="/CommentEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="commentFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Matchs</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="matchsChildren">

        <h:outputText value="There are no matchs associated with this user."
                   rendered="#{empty userHome.matchs}"/>

        <rich:dataTable value="#{userHome.matchs}"
                       var="_match"
                  rendered="#{not empty userHome.matchs}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="matchsTable">
            <rich:column sortBy="#{_match.idMatch}">
                <f:facet name="header">Id match</f:facet>
                <h:outputText value="#{_match.idMatch}"/>
            </rich:column>
            <rich:column sortBy="#{_match.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_match.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_match.seenDate}">
                <f:facet name="header">Seen date</f:facet>
                <h:outputText value="#{_match.seenDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_match.rejectDate}">
                <f:facet name="header">Reject date</f:facet>
                <h:outputText value="#{_match.rejectDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectmatch"
                     value="Select"
                      view="/Match.xhtml">
                    <f:param name="matchIdMatch"
                            value="#{_match.idMatch}"/>
                    <f:param name="matchFrom" value="User"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add match"
                view="/MatchEdit.xhtml">
            <f:param name="userIdUser"
                    value="#{userHome.instance.idUser}"/>
            <f:param name="matchFrom" value="User"/>
        </s:button>
    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
